﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="QLComment.aspx.cs" Inherits="Admin_BinhLuan_QLComment" %>

<%@ Register Assembly="PagerControl" Namespace="CutePager" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HomePlaceHolder" runat="Server">
    <script type="text/javascript">
        var gridMain = null;
        window.onload = function () {
            try {
                //get target base control.
                gridMain = document.getElementById('<%= this.gridCatalog.ClientID %>');
            }
            catch (err) {
                gridMain = null;
            }
        }
    </script>
    <script src="../../Scripts/QLComment.js" type="text/javascript"></script>
    <div class="hrm_header_placeholder">
        Quản lý Comment</div>
    <div style="padding: 10px; height: 600px">
        <asp:Panel ID="PanelAdd" Width="100%" GroupingText="Tìm kiếm thông tin" runat="server">
            <table border="0" width="100%" cellpadding="0" cellspacing="0">
                <tr>
                    <td colspan="5" height="10">
                    </td>
                </tr>
                <tr>
                    <td width="20">
                    </td>
                    <td width="70" class="hrm_title_blue">
                        Tiêu đề
                    </td>
                    <td width="7" class="hrm_title_blue">
                        :
                    </td>
                    <td width="220">
                        <asp:TextBox ID="txtTieuDe" CssClass="hrm_textbox" Width="200px" MaxLength="100"
                            runat="server"></asp:TextBox>
                    </td>
                    <td>
                        <asp:ImageButton ID="cmdTimKiem" ImageUrl="~/Images/tim.jpg" runat="server" OnClick="cmdTimKiem_Click" />
                        <asp:ImageButton ID="cmdTimLai" CausesValidation="false" ImageUrl="~/Images/timlai.jpg"
                            runat="server" OnClick="cmdTimLai_Click" />
                    </td>
                </tr>
                <tr>
                    <td colspan="5" height="8">
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="PanelList" Width="100%" GroupingText="Danh sách" Height="435" runat="server">
            <table border="0" width="100%" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="20">
                    </td>
                    <td style="padding-right: 15px; padding-top: 12px">
                        <asp:GridView ID="gridCatalog" runat="server" DataKeyNames="Id" Width="100%" BackColor="White"
                            OnRowDataBound="gridCatalog_RowDataBound" EmptyDataText="<br><center>Không tồn tại dữ liệu</center><br>"
                            BorderColor="#CCCCCC" AutoGenerateColumns="false" BorderStyle="Solid" BorderWidth="1px"
                            CellPadding="3">
                            <Columns>
                                <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="STT" ItemStyle-Width="30">
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="30">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkSelect" runat="server" />
                                        <asp:HiddenField ID="H_IdCatalog" runat="server" Value='<%# Eval("Id") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="IdTinTuc" ItemStyle-Width="25%" HeaderText="Id"></asp:BoundField>
                                <asp:BoundField DataField="HoTen" ItemStyle-Width="25%" HeaderText="Tên"></asp:BoundField>
                                <asp:TemplateField ItemStyle-HorizontalAlign="left" HeaderText="Nội dung" ItemStyle-Width="45%">
                                    <ItemTemplate>
                                        <asp:Label ID="lblNoiDung" runat="server" Text='<%# Eval("NoiDung") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Ngày cập nhật"
                                    ItemStyle-Width="90">
                                    <ItemTemplate>
                                        <asp:Label ID="LabelNgayCapNhat" runat="server" Text='<%# Convert.ToDateTime(Eval("NgayCapNhat")).ToString("dd/MM/yyyy")%>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="TrangThai" ItemStyle-Width="45px" HeaderText="Sử dụng">
                                </asp:BoundField>
                            </Columns>
                            <RowStyle ForeColor="#000066" />
                            <SelectedRowStyle BackColor="#dedfdf" Font-Bold="True" ForeColor="Gray" />
                            <HeaderStyle BackColor="#006699" Font-Bold="True" HorizontalAlign="Left" ForeColor="White" />
                        </asp:GridView>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" height="10">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td align="right" colspan="2">
                        <cc1:Pager ID="Pager1" runat="server" PreviousClause="Lùi" NextClause="Tiến" LastClause=""
                            FirstClause="" PageClause="Trang " OfClause=" /" PageSize="10" OnCommand="Pager1_Command"
                            ForeColor="#006600" Font-Bold="True" />
                        <br />
                    </td>
                </tr>
                <tr>
                    <td align="left">
                        &nbsp;
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>
    <asp:Panel ID="Panel2" CssClass="div_footer" BackColor="#d6e6f5" runat="server" Height="24px">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td>
                    <asp:ImageButton ID="cmdTaoMoi" CausesValidation="false" ImageUrl="~/Images/taomoi.jpg"
                        runat="server" PostBackUrl="~/admin/BinhLuan/CNComment.aspx" />
                    <asp:ImageButton ID="cmdHieuChinh" CausesValidation="false" OnClientClick="return HieuChinh_BinhLuan();"
                        ImageUrl="~/Images/hieuchinh.jpg" runat="server" OnClick="cmdHieuChinh_Click" />
                    <asp:ImageButton ID="cmdXoa" CausesValidation="false" OnClientClick="return Xoa_BinhLuan();"
                        ImageUrl="~/Images/xoa.jpg" runat="server" runat="server" OnClick="cmdXoa_Click" />
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
